package com.atguigu.gulimallcart.service;

import com.atguigu.gulimallcart.vo.Cart;
import com.atguigu.gulimallcart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @ClassName CartService
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/7/13
 * @Version 1.0
 */
public interface CartService {
    CartItem addToCart(Long skuId, Integer num) throws ExecutionException, InterruptedException;
    CartItem getCartInfoBySkuId(Long skuId);

    Cart getCart() throws ExecutionException, InterruptedException;

    void clearCart(String cartKey);

    void changeCheckStatus(Long skuId, Integer check);

    void changeCount(Long skuId, Integer count);

    void deleteItem(Long skuId);

    List<CartItem> getCurrentUserCartItems();

}
